import request from '@/util/request';

//获取所有类型列表
export const typeListService = () => {
    return request.get("/type/list");
}

//条件分页查询
export const listByPageService = (params) => {
    return request.get("/type/listByPage", { params: { ...params } });
}

//通过id查询获取信息
export const getByIdService = (id) => {
    return request.get("/type/getById?id=" + id)
}

//编辑信息
export const editService = (typeData) => {
    return request.put("/type/edit", typeData)
}

//新增信息
export const addService = (typeData) => {
    return request.post("/type/add", typeData)
}

//通过id删除信息
export const deleteByIdService = (id) => {
    return request.delete("/type/deleteById", { params: { id: id } })
}